package autorization;

/**
 * the Interface which should adhere any iterator used in quality
 * iterator for pass under the authorisation table
 * @author Volk ID = 1001
 * @version 0.1 Добавлен базовый функционал
 * @version 0.2 Проведена интеграция с системой ролей, добавлены сервисы для работы с ролями пользователя
 */
public interface IAutorizationIterator <T> {
    /**
     * Installation iterator on the collection beginning
    */
    public void begin ();
    /**
     * to Check up, whether it is possible to carry out transition to a following element
     * @return true - transition to carry out it is possible, false - transition to carry out it is impossible
    */
    public boolean hasNext ();
    /**
     * Transition to a following element
     * @return true - transition it is carried out, false - transition is not carried out
     */
    public boolean Next ();
    /**
     * to Receive the current password, in a case if iterator it is not established on
     * one of registered users, товозврат null values
     * @return the password of the user on which is established итератор
    */
    public String getPassword ();
     /**
     * to Receive a current key, with a case if the key is not established return null
     * values
     * @return the Login of the user on which is established итератор
     */
    public T getLogin ();
     /**
      * Получить идентификатор роли записи
      * @return идентификатор роли
     */
    public long getRole();
    /**
     * Count of registered users
     * @return size
     */
    public int getSize();
}
